<?php if (!defined('THINK_PATH')) exit();?><html>

<head>
	<title>购物车</title>
	<script src="/drclothes/Public/js/jquery.min.js"></script>
	<script src="/drclothes/Public/js/bootstrap.min.js"></script>
	<link href="/drclothes/Public/css/bootstrap.min.css" rel="stylesheet">
	<link href="/drclothes/Public/css/animate.min.css" rel="stylesheet">
	<link href="/drclothes/Public/css/style.css" rel="stylesheet">
</head>

<body>

	<div class="container-fluid background9">
<div class="container">
    <div class="row clearfix">
        <div class="col-xs-12 column">
            <?php
 if(!isset($_SESSION['username'])){ echo'<h6><a href="/drclothes/index.php"  style="color:#999;"><font class="glyphicon glyphicon-home">首页</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="/drclothes/index.php/home/form/login"  style="color:#999;"><font>登录</font></a>&nbsp;|&nbsp;
                        <a href="/drclothes/index.php/home/form/register"  style="color:#999;"><font>注册</font></a></h6>'; } else{ $username= $_SESSION['username']; $userrank= $_SESSION['userrank']; echo "<h6><font style='float:right;'>".$userrank."&nbsp;".$username."&nbsp;&nbsp;
                        <a href='/drclothes/index.php/home/form/logout' style='color:#999;'>退出</font>
                        <a href='/drclothes/index.php' style='color:#999;'><font class='glyphicon glyphicon-home'>首页</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        </h6>"; } ?>
        </div>
    </div>
</div>
</div>
<div class="container-fluid">
    <div class="container">
		<div class="row clearfix">
            <div class="col-xs-12 column" align="center">
                <img src="/drclothes/Public/image/logo.png" class="img-responsive margin15" />
            </div>
            <div class="col-xs-offset-4 col-xs-4 column" align="center" style="padding-top:13px;">
                <form role="search" class="form-horizontal" action="/drclothes/index.php/home/form/searchresult" method="get" style="margin-bottom:0px;">
                    <div class="input-group">
                        <input id="query" name="name" type="text" placeholder="搜索 商品..." class="form-control" required />
                        <span class="input-group-btn">
                            <button class="btn button2" type="submit" style="top:0px;">搜索</button>
                        </span>
                    </div>
                </form>
            </div>
		</div>
	</div>
</div>
<div class="container">
    <div class="row clearfix">
        <div class="col-xs-12 column padding3 padding1" align="center">
            <a href="/drclothes/index.php">首页</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/searchresult?name=">全部</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/searchresult?name=新">新款</a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/searchresult?name=促销">促销</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/searchresult?name=男">男士</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/searchresult?name=女">女士</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/cart">购物车</a>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/drclothes/index.php/home/form/orderlist">订单</a>
        </div>       
    </div>
</div>


	<div class="container">
		<div class="row clearfix">
			<div class="col-md-12 column margin4" style="min-height:800px;">
				<form action="/drclothes/index.php/home/form/cart_orderlist_all" method="get" id="order">

				<div class="page-header">
					<h1>
						购物车
					</h1>
				</div>
				<table class="table table-bordered" style="font-size:14px;">
					<thead>
						<tr>
							<th><input class="all" type="checkbox"/></th>
							<th>
								编号
							</th>
							<th>
								图片
							</th>
							<th>
								名称
							</th>
							<th>
								单价
							</th>
							<th>
								尺寸
							</th>
							<th>
								份数
							</th>
							<th>
								总价
							</th>
							<th>
								操作
							</th>
						</tr>
					</thead>
					<tbody align="center">
						<?php if(is_array($list)): $k = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "$empty" ;else: foreach($__LIST__ as $key=>$cartitem): $mod = ($k % 2 );++$k;?><!--volist 说明：name-传过来的结果集标识 result id-二级索引 key：索引名；未定义时变量为$i empty-result 结果集为空时的内容，可在Controller 中进行设置 -->
							<tr>
								<td style="padding-top:55px;">
									<input name='id[]' type='checkbox' value='<?php echo ($cartitem["id"]); ?>' class="noborder">
								</td>
								<td style="line-height:116px;">
									<?php echo ($k); ?>
								</td>
								<td>
									<img src="/drclothes/Public/<?php echo ($cartitem["img"]); ?>" style="width:80px;height:auto;">
								</td>
								<td style="line-height:116px;">
									<?php echo ($cartitem["name"]); ?>
								</td>
								<td style="line-height:116px;">
									<?php echo ($cartitem["price"]); ?>
								</td>
								<td style="line-height:116px;">
									<?php echo ($cartitem["size"]); ?>
								</td>
								<td style="line-height:116px;">
									<?php echo ($cartitem["number"]); ?>
								</td>
								<td style="line-height:116px;">
									<?php echo ($cartitem["zongjia"]); ?>
								</td>
								<td style="line-height:116px;">
									<a href="/drclothes/index.php/home/form/cart_delete?id=<?php echo ($cartitem["id"]); ?>" style="color:blue;">删除</a>
								</td>
							</tr><?php endforeach; endif; else: echo "$empty" ;endif; ?>
					</tbody>
				</table>

				</form>
				<div class="pages">
					<?php echo ($page); ?>
				</div>
				<button type="button" class="btn  button2" id="discard" style="float:right;">购买</button>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	  $('.all').click(function() {
	    if($(this).is(':checked')) {
	      $(':checkbox').attr('checked', 'checked');
	    } else {
	      $(':checkbox').removeAttr('checked');
	    }
	  });
	  $('#discard').click(function() {
    if($(':checked').size() > 0) {
    	$("#order").submit();
    } else {
      alert('没有选择！');
    }
  });

	</script>
	<div class="container-fluid">
<div class="container">
	<div class="row clearfix" align="center">
			<div class="col-xs-12 column color1 padding3">
		       	<img alt="" src="/drclothes/Public/image/logo.png" class="img-responsive" />
		    </div>
			<h5 style="margin-top:140px;">Drclothes 辽ICP备123456789号</h5>
		</div>
	</div>
</div>	
</div>
</body>

</html>